// 本文件为10086.cn网站导航菜单所需的js程序 

// 菜单滑动
function navOver(navNumber) {
	var navDiv =  document.getElementById("js0" + navNumber);
	navDiv.style.display = "block";
}
function navOut(navNumber) {
	var navDiv =  document.getElementById("js0" + navNumber);
	navDiv.style.display = "none";
}


// 网站群连接
function ShowDivCity() {
    document.getElementById("DivCity").style.display= "block";
}

function HiddenDivCity() {
    document.getElementById("DivCity").style.display = "none";
}

function ShowDivCity2() {
    document.getElementById("DivCity2").style.display= "block";
}

function HiddenDivCity2() {
    document.getElementById("DivCity2").style.display = "none";
}
function ShowDivCity3() {
    document.getElementById("DivCity3").style.display= "block";
}

function HiddenDivCity3() {
    document.getElementById("DivCity3").style.display = "none";
}

function ShowDivCity4() {
    document.getElementById("DivCity4").style.display= "block";
}

function HiddenDivCity4() {
    document.getElementById("DivCity4").style.display = "none";
}

function ShowDivkjbl() {
    document.getElementById("DivCity6").style.display= "block";
}

function HiddenDivkjbl() {
    document.getElementById("DivCity6").style.display = "none";
}

function ShowDivkjbl2() {
    document.getElementById("DivCity7").style.display= "block";
}

function HiddenDivkjbl2() {
    document.getElementById("DivCity7").style.display = "none";
}
function ShowDivkjbl3() {
    document.getElementById("DivCity8").style.display= "block";
}

function HiddenDivkjbl3() {
    document.getElementById("DivCity8").style.display = "none";
}

function ShowDivgmbtn1() {
    document.getElementById("Divgm1").style.display= "block";
}

function HiddenDivgmbtn1() {
    document.getElementById("Divgm1").style.display = "none";
}
function ShowDivgmbtn2() {
    document.getElementById("Divgm2").style.display= "block";
}

function HiddenDivgmbtn2() {
    document.getElementById("Divgm2").style.display = "none";
}
function ShowDivgmbtn3() {
    document.getElementById("Divgm3").style.display= "block";
}

function HiddenDivgmbtn3() {
    document.getElementById("Divgm3").style.display = "none";
}
function ShowDivgmbtn4() {
    document.getElementById("Divgm4").style.display= "block";
}

function HiddenDivgmbtn4() {
    document.getElementById("Divgm4").style.display = "none";
}
function ShowDivgmbtn5() {
    document.getElementById("Divgm5").style.display= "block";
}

function HiddenDivgmbtn5() {
    document.getElementById("Divgm5").style.display = "none";
}

function chk_frm_search() {

	if (document.frm_search.qt.value == '' || document.frm_search.qt.value.length < 2) {
		document.frm_search.qt.focus(); 
		return false;
	} 
	
	if (document.frm_search.qt.value == '关键字搜索') {
		document.frm_search.qt.focus();
		document.frm_search.qt.value = '';
		return false;
	}
	
	return true;
}

function search_network_click() {
	document.frm_search.style.value = 'standard';
	document.frm_search.database.value = '';
	return true;
}

function search_local_click() {
	document.frm_search.style.value = 'china';
	document.frm_search.database.value = 'chinamobile';
	return true;
}

// 首页图片轮播
function setTab(/*string*/name,/*int*/ curItem, /**/classHide, /**/classShow)
{
	var itemCnt = 20;
	for(i=1;i<=itemCnt;i++){
		var tab_h = document.getElementById("tab_" + name + "_" + i);
		if(tab_h){
			tab_h.className = classHide;
		}
	} 
	var tab_show = document.getElementById("tab_" + name + "_" + curItem);
	if(tab_show)tab_show.className = classShow;

	for(i=1;i<=itemCnt;i++){
		var ele_hide = document.getElementById("con_" + name + "_" + i);
		if(ele_hide) {
			ele_hide.style.display = "none";
		}
	}
	var ele_play = document.getElementById("con_" + name + "_" + curItem);
	if(ele_play) ele_play.style.display = "block";
}


//普通标签页
 function ExpTabs(obj,cur){
			for(var i=0;i<8;i++){
				if((i+1)%4==0){
					document.getElementById("Exp_Tabs_"+i).className = "norborder";	
				}else{
				document.getElementById("Exp_Tabs_"+i).className = "";
				}
				document.getElementById("ExpCon_"+i).className = "hidden";	
			}
			if((cur+1)%4==0){
			document.getElementById("Exp_Tabs_"+cur).className = "cur norborder";
			}else{
				document.getElementById("Exp_Tabs_"+cur).className = "cur";
			}
			document.getElementById("ExpCon_"+cur).className = "tab_con";		
		}
		function ChangeTabs(obj,cur){
			var objParent = obj.parentNode;
			var liObjs = objParent.getElementsByTagName("li");
			for(var k=0; k<liObjs.length;k++){
				liObjs[k].className = "";
				document.getElementById("Pro_"+k).className = "hidden";
			}
			obj.className = "cur";
			document.getElementById("Pro_"+cur).className = "";
		}
		function ChangeTabs2(obj,cur){
			var objParent = obj.parentNode;
			var liObjs = objParent.getElementsByTagName("li");
			for(var k=0; k<liObjs.length;k++){
				liObjs[k].className = "";
				document.getElementById("Pro2_"+k).className = "hidden";
			}
			obj.className = "cur";
			document.getElementById("Pro2_"+cur).className = "";
		}
		function ZFTabs(obj,cur){
			var objParent = obj.parentNode;
			var liObjs = objParent.getElementsByTagName("li");
			for(var k=0; k<liObjs.length;k++){
				liObjs[k].className = "";
				document.getElementById("ZFCon_"+k).className = "hidden";
			}
			obj.className = "cur";
			document.getElementById("ZFCon_"+cur).className = "";
		}
  var isActive = false;
		function showTip()
		{
			isActive = true;
			document.getElementById("SubNav").className = "";	
			
		}
		
		function hiddenDiv()
		{
			isActive = false;
			setTimeout("hiddenTip()",200);
		}
		function hiddenTip()
		{
			if(!isActive){
			document.getElementById("SubNav").className = "hidden";
			}
		}
		function ZFmap(){
			var zfobj = document.getElementById("zfMap");
			zfobj.className=zfobj.className=="hidden"?"block":"hidden";	
		}